package com.qgzj.controller;

import com.qgzj.entity.SysUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: 基础controller
 * @Author: yangyangbian
 * @CreateTime: 2018/5/11 17:05
 */
public class BaseController {

    private static final Logger logger = LoggerFactory.getLogger(BaseController.class);

//    @Value("${union.no}")
//    protected String unionNo;
//
//    @Value("${sso.url}")
//    protected String ssoUrl;
//
//    @Value("${domain}")
//    protected String domain;
//
//    @Value("${wechat.appId}")
//    protected String appId;
//
//    @Value("${wechat.appSecret}")
//    protected String appSecret;

    @Value("${img.path}")
    protected String imgPath;



    /**
	 * @Description: 获取用户信息
	 * @return SysUser
	 * @throws
	 *
	 * @author nianliangxie
	 * @date 2018年05月25日 上午11:35:41
	 */
    protected SysUser getCurrentUser(HttpServletRequest request, HttpServletResponse response) {
		return null;
    }

    /**
	 * @Description: 获取sso登陆地址
	 * @throws
	 *
	 * @author nianliangxie
	 * @date 2018年06月13日 下午17:35:41
	 */
    protected String genSSOLoginUrl(HttpServletRequest request) {
       return null;
    }

    /**
     * 根据uri前缀选择登陆系统
     * @param uri
     * @return
     */
    private Integer getSystemCode(String uri){
        return null;
    }

}